﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using ComicWeb.Models;

namespace ComicWeb.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class VClassificationsController : ControllerBase
    {
        private readonly ShopContext _context;
        //注入依赖
        public VClassificationsController(ShopContext context)
        {
            _context = context;
        }
        // GET: api/VClassifications
        /// <summary>
        /// 全部的漫画显示
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public async Task<ActionResult<IEnumerable<VClassification>>> GetVClassifications()
        {
            return await _context.VClassifications.ToListAsync();
        }
        


    }
}
